package com.ww7h.ui.base.ui.adapter

import android.content.Context
import android.util.SparseArray
import android.view.ViewGroup
import androidx.databinding.ViewDataBinding
import com.ww7h.ui.base.ui.adapter.model.RecyclerViewModel
import com.ww7h.ui.base.ui.adapter.item.ItemRecyclerView
import com.ww7h.ui.base.ui.adapter.item.ItemSpace

/**
 * ================================================
 * 描述：
 * 来源：     Android Studio.
 * 项目名：   BigObj
 * 包名：     com.ww7h.ui.base.ui.adapter
 * 创建时间：  2020/11/6 01:19
 * @author   ww
 * ================================================
 */

abstract class ViewHolderFactory<M: RecyclerViewModel> {

    abstract fun createViewHolder(context: Context, parent: ViewGroup, viewType: Int):
            RecyclerViewHolder<M, out ViewDataBinding, out ItemRecyclerView<M, out ViewDataBinding>>

    val spaceArray: SparseArray<ItemSpace> by lazy {
        SparseArray()
    }
}